package com.kinghood.productcenter.common.api.authority;


import com.kinghood.productcenter.common.api.authority.fallback.SysLogRemoteFallback;
import com.kinghood.infrastructure.api.authority.AddSysLogReqDTO;
import com.kinghood.infrastructure.model.KingHoodResponseVO;
import com.kinghood.infrastructure.model.constant.ServerNameConstant;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;

/**
 * description
 *
 * @author zhangFanJun
 * @date 2023-12-07 9:47
 **/
@FeignClient(value = ServerNameConstant.AUTHORITY_CENTER, path = "/authorityCenter/sysLog", fallback = SysLogRemoteFallback.class, contextId = "SysLogRemote")
public interface SysLogRemote {

    /**
     * 新增系统日志
     *
     * @param in 日志
     * @return 日志id
     * @author zfj
     * @date 2024/01/03
     */
    @PostMapping("/addLog")
    KingHoodResponseVO<Long> addLog(@Valid @RequestBody AddSysLogReqDTO in);

}
